<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org" >
<head>
<meta charset="UTF-8" />
<title>Spring Form Demo</title>
</head>
<body>
	<form action="#" th:action="@{/formDemo.con}" th:object="${person}" method="POST">
		<table>
			<tr>
				<td>Name:</td>
				<td><input type="text" th:field="*{name}" /></td>
				<td th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name
					Error</td>
			</tr>
			<tr>
				<td>Age:</td>
				<td><input type="text" th:field="*{age}" /></td>
				<td th:if="${#fields.hasErrors('age')}" th:errors="*{age}">Name
					Error</td>
			</tr>
			<tr>
				<td th:text="${ svrMsg }" > svrMsg </td>
			</tr>
			<tr>
				<td><button type="submit">Submit</button></td>
			</tr>
		</table>
	</form>
</body>
</html>